﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //显示程序中的错误码
            if (Application["ProError"] != null)
            {
                Exception erroy = Application["ProError"] as Exception;
                string strMsg = erroy.Message;        //erroy.HelpLink = "sss";
                //Response.Write("Message:" + strMsg + "<br/>");
                //Response.Write("HelpLink:" + erroy.HelpLink + "<br/>");
                //Response.Write("Source:" + erroy.Source + "<br/>");
                //Response.Write("TargetSite:" + erroy.TargetSite + "<br/>");
                //Response.Write("InnerException:" + erroy.InnerException + "<br/>");
                //Response.Write("StackTrace:" + erroy.StackTrace + "<br/>");
                DetailErrorInfo.InnerHtml = string.Format("错误:{0}<br/>跟踪:{1}", strMsg, erroy.StackTrace);
            }
        }
        //HttpException erroy = new HttpException();
        //string strCode = erroy.ErrorCode.ToString();
        //string strMsg = erroy.Message;        //erroy.HelpLink = "sss";
        //Response.Write("ErrorCode:" + strCode + "<br/>");
        //Response.Write("Message:" + strMsg + "<br/>");
        ////Response.Write("HelpLink:" + erroy.HelpLink + "<br/>");
        //Response.Write("Source:" + erroy.Source + "<br/>");
        //Response.Write("TargetSite:" + erroy.TargetSite + "<br/>");
        //Response.Write("InnerException:" + erroy.InnerException + "<br/>");
        //Response.Write("StackTrace:" + erroy.StackTrace + "<br/>");
        //Response.Write("GetHtmlErrorMessage:" + erroy.GetHtmlErrorMessage() + "<br/>");
        //Response.Write("erroy.GetHttpCode().ToString():" + erroy.GetHttpCode().ToString() + "<br/>");
        //Response.Write("erroy.Data.ToString()::" + erroy.Data.ToString() + "<br/>");     
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        出错啦！<br /> <a href='javascript:OnShow()'><b>查看详细信息（技术人员使用）</b><br /></a>
        <div id='ErrorInfo' style='display: none'>
            <div id="DetailErrorInfo" runat="server">
            </div>
        </div>
    </div>
    </form>
</body>
</html>
<script src="/Resource/jquery/jquery-1.8.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
    function OnShow() {
        $("#ErrorInfo").toggle();
    }
</script>
